//会员
import request from '@/utils/request'

/** ------------------------------- 会员编辑 ----------------------------------*/
//更改会员昵称和管理员
export function updateUser(data) {
  return request({
    url: '/ums/system/user/update',
    method: 'post',
    data
  })
}

/** ------------------------------- 会员赠送 ----------------------------------*/
// 会员赠送列表
export function appLogUserAmount(query) {
  return request({
    url: '/ums/system/appLogUserAmount/list',
    method: 'get',
    params: query
  })
}

// 会员赠送
export function updateVip(data) {
    return request({
      url: '/ums/system/appLogUserAmount/batchSendVip',
      method: 'post',
      data
    })
}

// 单个会员赠送
export function updateSingleVip(data) {
  return request({
    url: '/ums/system/appLogUserAmount/updateVip',
    method: 'post',
    data
  })
}

/** ------------------------------- 会员冲金 ----------------------------------*/
  // 会员赠送
  export function updateCash(data) {
      return request({
        url: '/ums/system/appLogUserAmount/updateCash',
        method: 'post',
        data
      })
  }

/** ------------------------------- VIP购买记录 ----------------------------------*/

  export function appLogVipList(query) {
    return request({
      url: '/ums/system/appLogVip/list',
      method: 'get',
      params: query
    })
  }

  /** ------------------------------- 会员列表 ----------------------------------*/

  export function getVipList(query) {
    return request({
      url: '/ums/system/user/list',
      method: 'get',
      params: query
    })
  }

  //停用启用用户
  export function userStopOrEnable(data) {
    return request({
      url: '/ums/system/user/stopOrEnable',
      method: 'post',
      data
    })
  }
  /** ------------------------------- 收货地址 ----------------------------------*/

  export function listAddr(query) {
    return request({
      url: '/ums/system/appUserAddr/listAddr',
      method: 'get',
      params: query
    })
  }
  //我的上级
  export function superior(query) {
    return request({
      url: '/ums/system/user/superior',
      method: 'get',
      params: query
    })
  }
   //我的下级
   export function subordinate(query) {
    return request({
      url: '/ums/system/user/subordinate',
      method: 'get',
      params: query
    })
  }
//我的流水记录
export function appLogCash(query) {
  return request({
    url: '/ums/system/appLogCash/list',
    method: 'get',
    params: query
  })
}
//我的积分记录
export function userIntegral(query) {
  return request({
    url: '/ums/system/appLogIntegral/list',
    method: 'get',
    params: query
  })
}


  //更换推荐人
  export function editParent(data) {
    return request({
      url: '/ums/system/usergroup/editParent',
      method: 'post',
      data
    })
  }

//我的消费券记录
  export function listAppLogConsume(query) {
    return request({
      url: '/ums/system/appLogConsume/listByUser',
      method: 'get',
      params: query
    })
  }

//消费券赠送记录
export function listManageSend(query) {
  return request({
    url: '/ums/system/appLogConsume/listManageSend',
    method: 'get',
    params: query
  })
}

 //推荐人单个赠送
 export function sendConsume(data) {
  return request({
    url: '/ums/system/appLogConsume/sendConsume',
    method: 'post',
    data
  })
}

 //推荐人批量赠送
 export function batchSendConsume(data) {
  return request({
    url: '/ums/system/appLogConsume/batchSendConsume',
    method: 'post',
    data
  })
}


//开馆之礼出价记录
export function listAppAuctionGift(query) {
  return request({
    url: '/ums/system/appAuctionGift/list',
    method: 'get',
    params: query
  })
}



  /** ------------------------------- 出金控制 ----------------------------------*/
 //出金控制列表
  export function listUserTakeControl(query) {
    return request({
      url: '/analy/system/userTakeControl/list',
      method: 'get',
      params: query
    })
  }
 //出金控制新增
  export function addUserTakeControl(data) {
    return request({
      url: '/admin/system/userTakeControl/add',
      method: 'post',
      data
    })
  }
 //出金控制修改
  export function editUserTakeControl(data) {
    return request({
      url: '/admin/system/userTakeControl/update',
      method: 'post',
      data
    })
  }
 //出金控制删除
  export function removeUserTakeControl(data) {
    return request({
      url: '/admin/system/userTakeControl/delete',
      method: 'post',
      params: data
    })
  }


  /** ------------------------------- 我的佣金 ----------------------------------*/
 //我的佣金列表
 export function listAppLogBrokerage(query) {
  return request({
    url: '/ums/system/appLogBrokerage/listMe',
    method: 'get',
    params: query
  })
}

  /** ------------------------------- 收益统计记录 ----------------------------------*/
 //我的佣金列表

export function getUserAssets(query) {
  return request({
    url: '/ums/system/appAdminAccOperation/getUserAssets',
    method: 'get',
    params: query
  })
}

export function getOrderResellDetail(query) {
  return request({
    url: '/oms/system/orderResell/orderResellDetail',
    method: 'get',
    params: query
  })
}

/** ------------------------------- 金积分赠送 ----------------------------------*/

//金积分赠送记录
export function listSendGold(query) {
  return request({
    url: '/ums/system/appLogIntegral/listSendGold',
    method: 'get',
    params: query
  })
}

//金积分批量赠送
export function excelSendGoold(data) {
  return request({
    url: '/ums/system/appLogIntegral/excelSendGoold',
    method: 'post',
    data
  })
}



/** ------------------------------- 抽奖赠送 ----------------------------------*/

//金积分赠送记录
export function listSendPrize(query) {
  return request({
    url: '/ums/system/appGifRecord/list',
    method: 'get',
    params: query
  })
}

//金积分批量赠送
export function excelSendPrize(data) {
  return request({
    url: '/ums/system/appGifRecord/excelSendPrizeExcel',
    method: 'post',
    data
  })
}

